from api.base_api import BaseApi


class WeWork(BaseApi):
    def get_token(self, secrete):
        corpid = 'wwc530254d4528c129'
        corpsecret = secrete
        data = {
            "method": "get",
            "url": 'https://qyapi.weixin.qq.com/cgi-bin/gettoken',
            "params": {
                "corpid": corpid,
                "corpsecret": corpsecret
            }
        }
        print(self.session_send(data).json()['access_token'])
        return self.session_send(data).json()['access_token']